package start.demo01.collection;

import org.junit.Test;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

public class Conlle {
    protected String s="xs";
    @Test public void main(){
        List li=new ArrayList<>();
        li.add("前置");
        List list=Collections.synchronizedList(li);
        list.add("字符串");
        list.forEach(val->System.out.println(val));
    }
    @Test public void tTo(){
        LinkedList list=new LinkedList();
        Iterator iterator = list.iterator();//返回listIterator
        iterator.next();
        list.listIterator();//可指定开始下标
    }
    public void main(String[] args){
        String w1=Conlle.this.s;
    }
    @Test public void tConcurrentHashMap(){
        ConcurrentHashMap map=new ConcurrentHashMap();
        Enumeration en=map.keys();
        map.put("","");
    }
}
